There are situations in which it can be useful to determine a delay between two (or more) signals so that time-dependent processing can be performed on one or more of the signals in a synchronised manner across the signals. For example, when a user is engaging in a call (e.g. an audio or video call) over a communication system, a far-end audio signal is received at a device of the user and is output from the device to the user. At the same time the user's device receives a near-end audio signal from the user for transmission to the far-end of the call. The near-end signal may include unwanted echo components of the far-end signal that is output from the device, and the device may utilise an echo canceller in order to cancel (that is, attenuate or suppress) the echo components in the near-end signal before it is transmitted to the far-end in the call. Modern communication systems are based on the transmission of digital signals. The received analogue information of the near-end signal, (for example including speech from the user, noise and echo components), is input into an analogue to digital converter at the device and converted into a digital signal. The digital signal is then encoded and transmitted in data packets over a channel to a device at the far-end of the call.
In order to cancel echo components in a near-end signal, an echo canceller uses an estimate of the delay between a component of the far-end signal being received over the communication system at the device and a corresponding echo component being received in the near-end signal at the input means (e.g. microphone) of the device. There is a finite delay between these two events due to, for example: (i) processing delays in receiving and outputting the far-end signal at the device, and (ii) the time taken for the signal to travel from the output means of the device (e.g. speakers) to the input means of the device (e.g. a microphone). Echo, such as that described above, which results from outputting the far-end audio signal from speakers of a device and then receiving corresponding echo components of the outputted signal at a microphone of the device is termed “acoustic echo”.
In order to estimate the delay between the far-end and near-end signals a plurality of candidate delays may be assessed and the “best” candidate delay is selected as the estimate of the delay between the far-end and near-end signals. In order to determine which of the candidate delays is the “best”, a respective correlation value can be determined for each of the plurality of candidate delays. Whichever of the candidate delays results in the highest correlation value between the far-end and near-end signals can be determined to be the “best” and can therefore be used as the estimate of the delay between the far-end and near-end signals. The “correlation value” may be any measure of the similarity between the signals, and may, for example, be calculated by performing a mathematical correlation operation or covariance operation on the two signals.